package com.imooc.springcloud;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author caryguan
 * @version V1.0
 * @Package com.imooc.springcloud
 * @date 2020/10/21 2:40
 */

@RestController
public class Controller {

    @Autowired//记住被feignClient注解标记的类会生成代理类的,这里注入的也就是代理类
    private IService service;

    @GetMapping("/sayHi")
    public String sayHi(){
        return service.sayHi();
    }
}